package com.RedRiver.hospitalsystem.record_service.client;

import com.RedRiver.hospitalsystem.record_service.client.param.CreateSerialParam;
import com.RedRiver.hospitalsystem.record_service.client.result.GetTimeByIdResult;
import com.RedRiver.hospitalsystem.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(contextId = "SerialClient",name="record-service",path="recordService/serial")
public interface SerialClient {

    @PostMapping("/createSerial")
    public Result<?> createSerial(@RequestBody @Valid CreateSerialParam serialParam);

    @GetMapping("/nextone")
    public Result<?> getnextone();

    @GetMapping("/getTimeById")
    public Result<GetTimeByIdResult> getTimeById(Integer id);
}
